<?php
class Model_Prowadzacy{

    private $table_name = 'prowadzacy';
    protected $results;

    public function __construct(){
        require_once("../../dbConnection.php");
}
	
public function getID($imie,$nazwisko){
	$this->results = mssql_query("SELECT id FROM $this->table_name WHERE imie='$imie' AND nazwisko='$nazwisko'");
        $row = mssql_fetch_array($this->results);
  return $row['id'];
}
public function insert($imie, $nazwisko, $tytul){
       $this->results = "INSERT INTO $this->table_name VALUES('$imie','$nazwisko','$tytul')";
       return mssql_query($this->results);
}
public function __destruct(){
	mssql_free_result($this->results);
	//mssql_close($con);
}
}
?>
